const RateLimit = require('express-rate-limit');

// app.enable('trust proxy'); // only if you're behind a reverse proxy (Heroku, Bluemix, AWS if you use an ELB, custom Nginx setup, etc)

const limiter = new RateLimit({
    windowMs: 60*60*1000, // 1 hour window
    // delayAfter: 1, // begin slowing down responses after the first request
    // delayMs: 3*1000, // slow down subsequent responses by 3 seconds per request
    max: 10, // start blocking after 5 requests
    message: "刷注册的你可以滚了[微笑]"
});

module.exports=limiter;

